<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../tpl/head.jsp"%>

<!------------------------------------- 页面介绍： 组织机构-------------------------------->
<div  id="LAY_app" class="layui-fluid">
    
    <div class="layui-card">
        <div class="layui-card-header layui-bg-cyan">
            <span  >权限中心 > 组织机构</span>
        </div>
        <div class="layui-card-body">
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title">
                    <li class="layui-this"><i class="layui-icon layui-icon-set"></i> 公司设置</li>
                    <li><i class="layui-icon layui-icon-tabs"></i> 新增公司</li>
                    <li><i class="layui-icon layui-icon-tabs"></i> 新增部门</li>
                    <li><i class="layui-icon layui-icon-list"></i> 新增子部门</li>

                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <!-- 公司设置 -->
                      
                        <%@ include file="./tpl/tplnewcompanylist.jsp"%>
                    </div>
                    <div class="layui-tab-item">
                        <!-- 新增公司 -->
                        <%@ include file="./tpl/tplnewcompany.jsp"%>
                       
                       
                    </div>
                    <div class="layui-tab-item">
                        <!--   内容2 -->
                        <form class="layui-form" action="">
                            
                            <div class="layui-form-item">
                                <div class=" layui-row layui-col-space10">
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label">名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="" required lay-verify="required" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label">公司</label>
                                        <div class="layui-input-block">
                                          <select name="city" lay-verify="required">
                                            <option value=""></option>
                                            <option value="0">北京</option>
                                            <option value="1">上海</option>
                                            <option value="2">广州</option>
                                            <option value="3">深圳</option>
                                            <option value="4">杭州</option>
                                          </select>
                                        </div>
                                      </div>
                                </div>
                                
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">代码</label>
                                <div class="layui-input-block">
                                    <input type="text" name="" required lay-verify="required" autocomplete="off"
                                        class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">备注</label>
                                <div class="layui-input-block">
                                    <textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit=""
                                        lay-filter="component-form-element">立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>
                        </form>

                    </div>
                    <div class="layui-tab-item">
                        <!-- 内容3 -->
                        <form class="layui-form" action="">
                            <div class="layui-form-item">
                                <div class=" layui-row layui-col-space10">
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label">公司</label>
                                        <div class="layui-input-block">
                                            <select name=" " lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">北京</option>
                                                <option value="1">上海</option>
                                                <option value="2">广州</option>
                                                <option value="3">深圳</option>
                                                <option value="4">杭州</option>
                                              </select>
                                        </div>
                                    </div>
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label">部门</label>
                                        <div class="layui-input-block">
                                          <select name=" " lay-verify="required">
                                            <option value=""></option>
                                            <option value="0">北京</option>
                                            <option value="1">上海</option>
                                            <option value="2">广州</option>
                                            <option value="3">深圳</option>
                                            <option value="4">杭州</option>
                                          </select>
                                        </div>
                                      </div>
                                </div>
                                
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">子部门名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="" required lay-verify="required" autocomplete="off"
                                        class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">代码</label>
                                <div class="layui-input-block">
                                    <input type="text" name="" required lay-verify="required" autocomplete="off"
                                        class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">备注</label>
                                <div class="layui-input-block">
                                    <textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit=""
                                        lay-filter="component-form-element">立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>

                </div>
            </div>
        </div>
    </div>
   
</div>
<style>
   
</style>

<script src="/statics/modules/vstore.js"></script>
<script>
  layui.use("tree", function () {
        
        layui.tree.render({
            elem: '#tree-demo' //传入元素选择器
            , nodes: [ //节点
                {
                    name: '公司设置'
                    , id: 1
                    , flag: 0
                    , spread: true
                    , children: [
                        {
                            name: '公司1'
                            , id: 21
                            , flag: 1
                            , spread: false
                            , children: [
                                {
                                    name: '子部门1'
                                    , id: 211
                                    , flag: 2
                                }, {
                                    name: '子部门2'
                                    , id: 212
                                    , flag: 2
                                }, {
                                    name: '子部门3'
                                    , id: 213
                                    , flag: 2
                                }
                            ]
                        }, {
                            name: '公司2'
                            , id: 22
                            , flag: 1
                            , children: [
                                {
                                    name: '子部门a'
                                    , id: 221
                                    , flag: 2
                                }, {
                                    name: '子部门b'
                                    , id: 222
                                    , flag: 2
                                }, {
                                    name: '子部门c'
                                    , id: 223
                                    , flag: 2
                                }
                            ]
                        }
                    ]
                }
            ]
            , click: function (node) {
                console.log(node) //node即为当前点击的节点数据

                Vue.set(vm.page, "treenode", node);
                Vue.set(vm.page, "flag", node.flag);

            }
        });

    })




</script>
<%@ include file="../tpl/foot.jsp"%>